﻿using System.Web.Mvc;
using ECGadmin.Utility;
using ECGadmin.WebUI.Infrastructure;
using ECGadmin.WebUI.Models;
using System;
namespace ECGadmin.WebUI.Attributes
{
    public class AdminCheckRoles : ActionFilterAttribute
    {
        public override void OnActionExecuting(ActionExecutingContext filterContext)
        {
            // kiem tra cookie
            //var loginCookie = filterContext.HttpContext.Request.Cookies["loginCookie"];
            //if (loginCookie != null)
            //{

            //}

            //if (filterContext.HttpContext.Session[SessionConfig.SessionAdminLogged] == null)
            //{
            //    filterContext.Result = new RedirectResult("/AdminLogin/Login");
            //}
        }
    }
}